/*
 * XML Type:  PresentmentDlvMessageSet
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.PresentmentDlvMessageSet
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML PresentmentDlvMessageSet(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class PresentmentDlvMessageSetImpl extends net.ofx.types.x2003.x04.impl.AbstractMessageSetImpl implements net.ofx.types.x2003.x04.PresentmentDlvMessageSet
{
    
    public PresentmentDlvMessageSetImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName PRESDLVMSGSETV1$0 = 
        new javax.xml.namespace.QName("", "PRESDLVMSGSETV1");
    
    
    /**
     * Gets array of all "PRESDLVMSGSETV1" elements
     */
    public net.ofx.types.x2003.x04.PresentmentDlvMessageSetV1[] getPRESDLVMSGSETV1Array()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(PRESDLVMSGSETV1$0, targetList);
            net.ofx.types.x2003.x04.PresentmentDlvMessageSetV1[] result = new net.ofx.types.x2003.x04.PresentmentDlvMessageSetV1[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "PRESDLVMSGSETV1" element
     */
    public net.ofx.types.x2003.x04.PresentmentDlvMessageSetV1 getPRESDLVMSGSETV1Array(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentDlvMessageSetV1 target = null;
            target = (net.ofx.types.x2003.x04.PresentmentDlvMessageSetV1)get_store().find_element_user(PRESDLVMSGSETV1$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "PRESDLVMSGSETV1" element
     */
    public int sizeOfPRESDLVMSGSETV1Array()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PRESDLVMSGSETV1$0);
        }
    }
    
    /**
     * Sets array of all "PRESDLVMSGSETV1" element
     */
    public void setPRESDLVMSGSETV1Array(net.ofx.types.x2003.x04.PresentmentDlvMessageSetV1[] presdlvmsgsetv1Array)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(presdlvmsgsetv1Array, PRESDLVMSGSETV1$0);
        }
    }
    
    /**
     * Sets ith "PRESDLVMSGSETV1" element
     */
    public void setPRESDLVMSGSETV1Array(int i, net.ofx.types.x2003.x04.PresentmentDlvMessageSetV1 presdlvmsgsetv1)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentDlvMessageSetV1 target = null;
            target = (net.ofx.types.x2003.x04.PresentmentDlvMessageSetV1)get_store().find_element_user(PRESDLVMSGSETV1$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(presdlvmsgsetv1);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "PRESDLVMSGSETV1" element
     */
    public net.ofx.types.x2003.x04.PresentmentDlvMessageSetV1 insertNewPRESDLVMSGSETV1(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentDlvMessageSetV1 target = null;
            target = (net.ofx.types.x2003.x04.PresentmentDlvMessageSetV1)get_store().insert_element_user(PRESDLVMSGSETV1$0, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "PRESDLVMSGSETV1" element
     */
    public net.ofx.types.x2003.x04.PresentmentDlvMessageSetV1 addNewPRESDLVMSGSETV1()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PresentmentDlvMessageSetV1 target = null;
            target = (net.ofx.types.x2003.x04.PresentmentDlvMessageSetV1)get_store().add_element_user(PRESDLVMSGSETV1$0);
            return target;
        }
    }
    
    /**
     * Removes the ith "PRESDLVMSGSETV1" element
     */
    public void removePRESDLVMSGSETV1(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PRESDLVMSGSETV1$0, i);
        }
    }
}
